import './Button.css'
function Button(){
    let count = 0;
    const handleClick = (e)=>{console.log(e); e.target.textContent="OUCH"}
    const handleClick2 = (name)=>{
        if(count < 3){
            count ++;
            console.log( `${name} click me  ${count} times/s`);
        }else {
            console.log( `${name} stop clicking me `);
        }
    }
    return (
        <>
        <button className='button' onClick={()=>handleClick2("test")}>Click me</button>
        <button className='button' onClick={(e)=>handleClick(e)}>Click me2</button>
        </>
    )
}

export default Button;